package student.dao;

import util.MysqlUtil;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class StudentDao {
    public void studentSelect(){
        try{
            Statement jbdc= MysqlUtil.JBDC();
            String sql="select * form student";
            ResultSet resultSet= jbdc.executeQuery(sql);
            while(resultSet.next()){
                int studentId=resultSet.getInt("student_id");
                String studentName=resultSet.getNString("student_name");
                String studentLoginName=resultSet.getNString("student_login_name");
                String studentSex=resultSet.getNString("student_sex");
                int studentAge=resultSet.getInt("student_age");
                System.out.println("输出");
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
